<?php 
class Agitum_Controller_Plugin_Sidebar extends Zend_Controller_Plugin_Abstract
{
    public function dispatchLoopStartup( Zend_Controller_Request_Abstract $request ) 
    {
        printf( "Class: %s; Method: %s, File: %s; Line: %s<br/>\n", __CLASS__, __FUNCTION__, __FILE__, __LINE__);

        if ($request->isXmlHttpRequest()) 
            return;
            
        $request->setDispatched(true);
        $stack = Zend_Controller_Front::getInstance()->getPlugin('Zend_Controller_Plugin_ActionStack');
        
        $login = clone $request;
        $login->setModuleName('user')
        	  ->setControllerName('user')
              ->setActionName('login')
              ->setParam('responseSegment', 'userlogin');
        
        $stack->pushStack($login);
        
        $userinfo = clone $request;
        $userinfo->setModuleName('user')
        			->setControllerName('user')
                     ->setActionName('info')
                     ->setParam('responseSegment', 'userinfo');
        $stack->pushStack($userinfo);
    }
}